<?php
namespace app\seller\controller;
use think\Input;
use think\Controller;
class Common extends Controller{
    protected $sys;
    public function initialize(){ 
        $this->sys = cache('System'); 
        $this->assign('sys',$this->sys);
        if(session('aid') && input('asid')){
            session('seller',null);
            session('seller.id',input('asid')); 
        }else if (!session('seller.id')) {
            $this->redirect('login/index');
        }
        $this->seller=db('shop')->where('id',session('seller.id'))->find();
        $this->assign('seller',$this->seller); 
    }
    public function _empty(){
        return $this->error('空操作，返回上次访问页面中...');
    }
    //退出登陆
    public function logout(){
        session('seller',null);
        $this->redirect('login/index');
    }
}